public class Test_string {

    public static void main(String[] args) {

        //一个字符串  本质上是一个 字符数组
        String str= "hello";
        //char[] chars = {'h','e','l','l','e'};
         //获得第几个字符 charAt(下标的值)
        //char c = str.charAt(1);
        //System.out.println(c);
        //字符串转换为字符数组
       /* char[] chars = str.toCharArray();
        for(int i=0;i<chars.length;i++){
            System.out.println(chars[i]);
        }*/
        //把字符数组转换为字符串
        char[] chars = {'h','e','l','l','o'};
        String str1 = String.valueOf(chars);
        System.out.println(str1);





    }
}
